@extends('wx.layout.default')

@section('wx.pheader')
  @include('wx.layout.swiper')
@stop

@section('wx.pbody')

  <div class="weui-cells weui-grids">
    <a href="{{route('wx.my.activity')}}" class="weui-grid">
      <div class="weui-grid__label fsize" style="color:#01579B;">
        <h2>{{$user->summary->signs}}</h2>
      </div>
      <p class="weui-grid__label">
        签到
      </p>
    </a>
    <a href="{{route('wx.my.borrow')}}" class="weui-grid">
      <div class="weui-grid__label fsize" style="color:#388E3C;">
        <h2>{{$user->summary->borrows}}</h2>
      </div>
      <p class="weui-grid__label">
        借阅
      </p>
    </a>
    <a href="{{route('wx.my.point')}}" class="weui-grid">
      <div class="weui-grid__label fsize" style="color:#FB8C00;">
        <h2>{{$user->summary->points}}</h2>
      </div>
      <p class="weui-grid__label">
        积分
      </p>
    </a>

    <!--<a href="{{route('wx.my.question')}}" class="weui-grid">
      <div class="weui-grid__icon">
        <i class="iconfont" style="font-size: 160%;">&#xe635;</i>
      </div>
      <p class="weui-grid__label">
        端午节答题
      </p>
    </a>-->

    
    @foreach($typies as $type)
      <a href="{{route('wx.deploy',$type->id)}}" class="weui-grid">
        <div class="weui-grid__icon">
          {!! $type->icon !!}
        </div>
        <p class="weui-grid__label">
          {{ $type->name }}
        </p>
      </a>
    @endforeach

  </div>

  <div class="weui-cells">
    <a href="{{route('wx.my.deploy')}}" class="weui-cell weui-cell_access">
      <div class="weui-cell__hd"><i class="iconfont">&#xe686;</i></div>
      <div class="weui-cell__bd">
        <p>我的报名</p>
      </div>
      <div class="weui-cell__ft">{{$user->clases->count()}}</div>
    </a>
    <a href="{{route('wx.my.book')}}" class="weui-cell weui-cell_access">
      <div class="weui-cell__hd"><i class="iconfont">&#xe67b;</i></div>
      <div class="weui-cell__bd">
        <p>我的捐书</p>
      </div>
      <div class="weui-cell__ft">{{$user->books->count()}}</div>
    </a>
    <!--<a href="{{route('wx.my.info')}}" class="weui-cell weui-cell_access">
      <div class="weui-cell__hd"><i class="iconfont">&#xe660;</i></div>
      <div class="weui-cell__bd">
        <p>学生/儿童资料管理</p>
      </div>
      <div class="weui-cell__ft"></div>
    </a>
    <div class="weui-cell weui-cell_access">
      <div class="weui-cell__hd"><i class="iconfont">&#xe63a;</i></div>
      <div class="weui-cell__bd">
        <p>手机号码修改</p>
      </div>
      <div class="weui-cell__ft"></div>
    </div>-->
  </div>


  <div class="weui-btn-area" style="margin-bottom: 0;">
    <a href="{{route('wx.logout')}}" class="weui-btn weui-btn_default">退出</a>
  </div>

@stop

@section('javascript')
  <script src="//cdn.bootcss.com/jquery-weui/1.2.1/js/swiper.min.js"></script>
  <script src="//cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js"></script>
  <script type="text/javascript">
    $(function() {

      $('.swiper-container').swiper({
        loop: true,
        autoplay: 5000,
        pagination: '.swiper-pagination',
        paginationClickable: true
      });

    });
  </script>
@stop